import random
"""
流程控制
"""
#单分支结构 if
# num_01 = 5
# num_02 = 1
# num_03 = 0
# if num_02 < num_01:
#     num_03 = num_02 + num_01
# print(num_03)

#双分支结构 if-else
# num_01 = 5
# num_02 = 7
# num_03 = 0
# if num_02 < num_01:
#     num_03 = num_02 + num_01
# else:
#     num_03 = num_02 - num_01
# print(num_03)

#多分支结构   if - elif - elif ... - else
# num_01 = 7
# num_02 = 7
# num_03 = 0
# if num_02 < num_01:
#     num_03 = num_02 + num_01
# elif num_02 == num_01:
#     num_03 = num_02 * num_01
# else:
#     num_03 = num_02 - num_01
# print(num_03)

"""
循环结构
"""
#while循环
# n = int(input("请输入一个整数："))
# temp = 0
# S = 0
# while temp <= n:  #如果变量temp小于等于n，进入循环执行下面的语句，如果temp大于n，跳出循环结束。
#     S = S + temp
#     temp += 1
# print(S)

# for循环
# n = int(input("请输入一个整数："))
# S = 0
# for temp in range(0,n+1):
#     S = S + temp
# print(S)

#break 关键字，continue 关键字
# for i in range(0,101):
#     if i == 50:
#         # break
#         continue
#     print(i)

# 循环嵌套
#打印九九乘法表
for i in range(1,10):
    for j in range(1,i+1):
        print(j ," * ",i," = ",i*j,'   ',end='')
    print(" ")

# num_04 = random.randint(1,10)
# print(num_04)